package com.qf.day09.work3;

import java.util.Comparator;

public class HeroComparator implements Comparator<Hero> {
    @Override
    public int compare(Hero o1, Hero o2) {
       return o1.getLife() - o2.getLife();
    }
}
